package com.hmkj.core.constant;

/**
 * Created on 2017/3/7.
 */
public class Enum {
    //超级管理角色roleid
    public static final Integer PLATFORM_ROLE_ID = 0;
    //投资人角色roleid
    public static final Integer INVEST_ROLE_ID = 2;
    //主销售roleId
    public static final Integer SELLER_ROLE_ID = 3;
    //一级代理商 roleId
    public static final Integer ONE_ROLE_ID = 5;
    //二级代理商roleId
    public static final Integer TWO_ROLE_ID = 6;
    //三级代理商roleId
    public static final Integer THREE_ROLE_ID = 7;
    //次销售roleId
    public static final Integer NEXT_SELLER_ROLE_ID = 8;
    //代理商销售roleId
    public static final Integer AGENT_SELLER_ROLE_ID = 9;
    //三级代理商roleId
    //投资人角色名字
    public static final String INVEST_ROLE_NAME = "投资人";
    //销售角色名字
    public static final String SELLER_ROLE_NAME = "主销售";
    //代理商角色名字
    public static final String ONE_ROLE_NAME = "一级代理商";
    //代理商角色名字
    public static final String TWO_ROLE_NAME = "二级代理商";
    //代理商角色名字
    public static final String THREE_ROLE_NAME = "三级代理商";
    //次销售角色名字
    public static final String NEXT_SELLER_ROLE_NAME = "次销售";
    //代理商销售角色名字
    public static final String AGENT_SELLER_ROLE_NAME = "代理商销售";
    //admin表投资人type
    public static final Integer INVEST_TYPE = 3;
    //admin表主销售type
    public static final Integer SELLER_TYPE = 4;
    //admin表一级代理商type
    public static final Integer ONE_TYPE = 5;
    //admin表一级代理商type
    public static final Integer TWO_TYPE = 6;
    //admin表三级代理商type
    public static final Integer THREE_TYPE = 7;
    //admin表次销售type
    public static final Integer NEXT_SELLER_TYPE = 8;
    //admin表代理商销售type
    public static final Integer AGENT_SELLER_TYPE = 9;
    //充值类型：线下
    public static final String RECHARGE_TYPE_OFFLINE = "线下";
    //实名认证审核状态：待认证
    public static final Integer NORMAL = 1;
    /**
     * 资金变动枚举
     *
     * @author
     *
     */
    public enum Direction {
        OUT((byte) 1, "支出"),
        IN((byte)2, "收入");

        private byte Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public byte getValue() {
            return Value;
        }

        public void setValue(byte value) {
            Value = value;
        }

        Direction(byte Value, String name) {
            this.Value = Value;
            this.name = name;
        }

        public static String Direction(Byte value) {
            if (value != null) {
                for (Direction a : Direction.values()) {
                    if (a.getValue() == value) {
                        return a.getName();
                    }
                }
            }
            return null;
        }
    }
    /**
     * 状态枚举
     *
     * @author
     *
     */
    public enum Status {
        ON((byte) 1, "启用"),
        OFF((byte)2, "禁用");

        private byte Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public byte getValue() {
            return Value;
        }

        public void setValue(byte value) {
            Value = value;
        }

        Status(byte Value, String name) {
            this.Value = Value;
            this.name = name;
        }

        public static String Status(Byte value) {
            if (value != null) {
                for (Status a : Status.values()) {
                    if (a.getValue() == value) {
                        return a.getName();
                    }
                }
            }
            return null;
        }
    }
    /**
     * 删除标记枚举
     *
     * @author
     *
     */
    public enum DELFLAG {
        YES((byte) 1, "是"),
        NO((byte)0, "否");

        private byte Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public byte getValue() {
            return Value;
        }

        public void setValue(byte value) {
            Value = value;
        }

        DELFLAG(byte Value, String name) {
            this.Value = Value;
            this.name = name;
        }

        public static String DELFLAG(Byte value) {
            if (value != null) {
                for (DELFLAG a : DELFLAG.values()) {
                    if (a.getValue() == value) {
                        return a.getName();
                    }
                }
            }
            return null;
        }
    }

    /**
     * 审核状态枚举
     *
     * @author
     *
     */
    public enum VERIFY_STATUS {
        AUDIT((byte) 1, "待审核"),
        PASS((byte)2, "通过"),
        NOPASS((byte)3,"不通过");

        private byte Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public byte getValue() {
            return Value;
        }

        public void setValue(byte value) {
            Value = value;
        }

        VERIFY_STATUS(byte Value, String name) {
            this.Value = Value;
            this.name = name;
        }

        public static String VERIFY_STATUS(Byte value) {
            if (value != null) {
                for (VERIFY_STATUS a : VERIFY_STATUS.values()) {
                    if (a.getValue() == value) {
                        return a.getName();
                    }
                }
            }
            return null;
        }
    }
    /**
     * 订单状态枚举
     *
     * @author
     *
     */
    public enum OrderStatus {
        MATCHING(1, "匹配中"),
        TRADING(2, "交易中"),
        HOLDING(3,"持仓中"),
        WAITPINGCANG(4,"待平仓"),
        PINGCANGING(5,"平仓中"),
        WAITACCOUNT(6,"待结算"),
        ACCOUNTED(7,"已结算"),
        LIUDAN(8,"流单");

        private Integer Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getValue() {
            return Value;
        }

        public void setValue(Integer value) {
            Value = value;
        }

        OrderStatus(Integer Value, String name) {
            this.Value = Value;
            this.name = name;
        }

        public static String OrderStatus(Integer value) {
            if (value != null) {
                for (OrderStatus a : OrderStatus.values()) {
                    if (a.getValue() == value) {
                        return a.getName();
                    }
                }
            }
            return null;
        }
    }
    /**
     * 用户表类型枚举
     *
     * @author
     *
     */
    public enum UserType {
        USER(1, "客户"),
        INVESTOR(2, "投资人"),
        NEXTSELLER(3,"次销售"),
        ONELEVEL(4,"一级代理商"),
        TWOLEVEL(5,"二级代理商"),
        THREELEVEL(6,"三级代理商"),
        AGENTSELLER(7,"代理商销售");
        private Integer Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getValue() {
            return Value;
        }

        public void setValue(Integer value) {
            Value = value;
        }

        UserType(Integer Value, String name) {
            this.Value = Value;
            this.name = name;
        }

        public static String UserType(Integer value) {
            if (value != null) {
                for (UserType a : UserType.values()) {
                    if (a.getValue() == value) {
                        return a.getName();
                    }
                }
            }
            return null;
        }
    }
}
